import request from "@/utils/request";

export default {
  addRole(data) {
    return request({
      url: "/api/role/add",
      method: "post",
      data,
    });
  },
  updateRole(data) {
    return request({
      url: "/api/role/update",
      method: "put",
      data,
    });
  },
  delRole(data){
    return request({
        url : "/api/role/delete/" + data.id,
        method: "delete"
    })
  },
  getAssignTreeApi(data){
    return request({
        url:"/api/role/getAssignPermissionTree",
        method: "get",
        params:{
            adId : data.adId,
            roleId : data.roleId
        }
    })
  }

};
